-- Automatisch aangemaakte file! Niet wijzigen!
SET NOCOUNT ON
SET QUOTED_IDENTIFIER ON
GO

PRINT '---- CRUD Matrix'

SET TRANSACTION ISOLATION LEVEL READ COMMITTED
GO

BEGIN TRAN

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Bond',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblChairmen'
AND ucl_ColumnName IN ('chm_PersonID','chm_ClubName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Bond',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblClubs'
AND ucl_ColumnName IN ('clb_Name','clb_Longname','clb_Adres','clb_Zipcode','clb_City','clb_Province','clb_Telephone','clb_Email','clb_URL','clb_Description','clb_Ranking')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Bond',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFamilies'
AND ucl_ColumnName IN ('fam_Telephone','fam_Email','fam_BankAccount')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Bond',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFamilies'
AND ucl_ColumnName IN ('fam_ClubName','fam_FamilyName','fam_Adres','fam_Zipcode','fam_City')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Bond',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFederation'
AND ucl_ColumnName IN ('fed_Name','fed_Adres','fed_Zipcode','fed_City','fed_Telephone','fed_Email','fed_URL')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Bond',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_Telephone','prs_Email','prs_Username','prs_Remarks','prs_RefereeNr','prs_Referee')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Bond',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_ID','prs_Lastname','prs_MiddleName','prs_Firstname','prs_Initials','prs_Sexe','prs_DateofBirth','prs_FamilyClubName','prs_FamilyName','prs_FederationNr','prs_State','prs_Active')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblContributionDiscountMember'
AND ucl_ColumnName IN ('cdm_Clubname','cdm_Season','cdm_Number','cdm_Amount')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblContributionDiscounts'
AND ucl_ColumnName IN ('cdc_Clubname','cdc_Season','cdc_Discount')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblContributionFees'
AND ucl_ColumnName IN ('cnt_Clubname','cnt_Season','cnt_Kind','cnt_Fee')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Club',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFamilies'
AND ucl_ColumnName IN ('fam_Contribution')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFamilies'
AND ucl_ColumnName IN ('fam_ClubName','fam_FamilyName','fam_Adres','fam_Zipcode','fam_City','fam_Telephone','fam_Email','fam_BankAccount')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Club',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_Username','prs_FederationNr','prs_State','prs_RefereeNr','prs_Referee','prs_Active')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Ledenadministratie Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_ID','prs_Lastname','prs_MiddleName','prs_Firstname','prs_Initials','prs_Sexe','prs_DateofBirth','prs_Telephone','prs_Email','prs_FamilyClubName','prs_FamilyName','prs_Remarks')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblCards'
AND ucl_ColumnName IN ('crd_HomeClubname','crd_HomeSeason','crd_HomeTeamName','crd_AgainstClubname','crd_AgainstSeason','crd_AgainstTeamName','crd_Clubname','crd_Season','crd_TeamName','crd_PersonID','crd_Card','crd_Time')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblClubs'
AND ucl_ColumnName IN ('clb_Name','clb_Longname','clb_Adres','clb_Zipcode','clb_City','clb_Province','clb_Telephone','clb_Email','clb_URL','clb_Description','clb_Ranking')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblComplex'
AND ucl_ColumnName IN ('cpx_Clubname','cpx_ComplexName','cpx_Adres','cpx_Zipcode','cpx_City','cpx_Telephone','cpx_Description')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblContributionDiscountMember'
AND ucl_ColumnName IN ('cdm_Clubname','cdm_Season','cdm_Number','cdm_Amount')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblContributionDiscounts'
AND ucl_ColumnName IN ('cdc_Clubname','cdc_Season','cdc_Discount')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblContributionFees'
AND ucl_ColumnName IN ('cnt_Clubname','cnt_Season','cnt_Kind','cnt_Fee')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFamilies'
AND ucl_ColumnName IN ('fam_ClubName','fam_FamilyName','fam_Contribution')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,1,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFamilies'
AND ucl_ColumnName IN ('fam_Adres','fam_Zipcode','fam_City','fam_Telephone','fam_Email','fam_BankAccount')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFederation'
AND ucl_ColumnName IN ('fed_Name','fed_Adres','fed_Zipcode','fed_City','fed_Telephone','fed_Email','fed_URL')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFields'
AND ucl_ColumnName IN ('fld_Clubname','fld_ComplexName','fld_Field','fld_KindOfField')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatches'
AND ucl_ColumnName IN ('mat_HomeClubname','mat_HomeSeason','mat_HomeTeamName','mat_AgainstClubname','mat_AgainstSeason','mat_AgainstTeamName','mat_Date','mat_From','mat_To','mat_Clubname','mat_ComplexName','mat_Field','mat_homegoals','mat_againstgoals','mat_Description')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatchPlayers'
AND ucl_ColumnName IN ('mpl_HomeClubname','mpl_HomeSeason','mpl_HomeTeamName','mpl_AgainstClubname','mpl_AgainstSeason','mpl_AgainstTeamName','mpl_Clubname','mpl_Season','mpl_TeamName','mpl_PersonID')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatchReferees'
AND ucl_ColumnName IN ('mrf_HomeClubname','mrf_HomeSeason','mrf_HomeTeamName','mrf_AgainstClubname','mrf_AgainstSeason','mrf_AgainstTeamName','mrf_PersonID','mrf_RoleName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_ID','prs_Lastname','prs_MiddleName','prs_Firstname','prs_Initials','prs_Sexe','prs_DateofBirth','prs_Username','prs_FamilyClubName','prs_FamilyName','prs_FederationNr','prs_State','prs_Remarks','prs_RefereeNr','prs_Referee','prs_Active')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,1,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_Telephone','prs_Email')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPools'
AND ucl_ColumnName IN ('pol_Season','pol_TeamKind','pol_ClassName','pol_PoolName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblTasks'
AND ucl_ColumnName IN ('tsk_Clubname','tsk_Name')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblTeamMembers'
AND ucl_ColumnName IN ('tmm_Clubname','tmm_Season','tmm_TeamName','tmm_PersonID','tmm_Suspension')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblTeams'
AND ucl_ColumnName IN ('tea_Clubname','tea_Season','tea_TeamName','tea_PoolSeason','tea_TeamKind','tea_ClassName','tea_PoolName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Leden',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblVolunteerTasks'
AND ucl_ColumnName IN ('vsk_Clubname','vsk_TaskName','vsk_PersonID','vsk_Date','vsk_From','vsk_To')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Scheidsrechterscommissie Bond',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_ID','prs_Lastname','prs_MiddleName','prs_Firstname','prs_Initials','prs_Sexe','prs_DateofBirth','prs_Telephone','prs_Email','prs_Username','prs_FamilyClubName','prs_FamilyName','prs_FederationNr','prs_State','prs_Remarks','prs_Active')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Scheidsrechterscommissie Bond',ucl_Tablename,ucl_ColumnName,1,1,0,1,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_RefereeNr','prs_Referee')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Scheidsrechterscommissie Club',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblCards'
AND ucl_ColumnName IN ('crd_NrOfSuspension')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Scheidsrechterscommissie Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblCards'
AND ucl_ColumnName IN ('crd_HomeClubname','crd_HomeSeason','crd_HomeTeamName','crd_AgainstClubname','crd_AgainstSeason','crd_AgainstTeamName','crd_Clubname','crd_Season','crd_TeamName','crd_PersonID','crd_Card','crd_Time')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Scheidsrechterscommissie Club',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatches'
AND ucl_ColumnName IN ('mat_HomeClubname','mat_HomeSeason','mat_HomeTeamName','mat_AgainstClubname','mat_AgainstSeason','mat_AgainstTeamName','mat_Date')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Scheidsrechterscommissie Club',ucl_Tablename,ucl_ColumnName,1,1,0,1,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatches'
AND ucl_ColumnName IN ('mat_homegoals','mat_againstgoals')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Scheidsrechterscommissie Club',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatchPlayers'
AND ucl_ColumnName IN ('mpl_HomeClubname','mpl_HomeSeason','mpl_HomeTeamName','mpl_AgainstClubname','mpl_AgainstSeason','mpl_AgainstTeamName','mpl_Clubname','mpl_Season','mpl_TeamName','mpl_PersonID')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Scheidsrechterscommissie Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatchReferees'
AND ucl_ColumnName IN ('mrf_HomeClubname','mrf_HomeSeason','mrf_HomeTeamName','mrf_AgainstClubname','mrf_AgainstSeason','mrf_AgainstTeamName','mrf_PersonID','mrf_RoleName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Technische commissie Club',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatches'
AND ucl_ColumnName IN ('mat_HomeClubname','mat_HomeSeason','mat_HomeTeamName','mat_AgainstClubname','mat_AgainstSeason','mat_AgainstTeamName','mat_Date','mat_From','mat_To','mat_Clubname','mat_ComplexName','mat_Field','mat_homegoals','mat_againstgoals','mat_Description')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Technische commissie Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatchPlayers'
AND ucl_ColumnName IN ('mpl_HomeClubname','mpl_HomeSeason','mpl_HomeTeamName','mpl_AgainstClubname','mpl_AgainstSeason','mpl_AgainstTeamName','mpl_Clubname','mpl_Season','mpl_TeamName','mpl_PersonID')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Technische commissie Club',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblTeamMembers'
AND ucl_ColumnName IN ('tmm_Suspension')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Technische commissie Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblTeamMembers'
AND ucl_ColumnName IN ('tmm_Clubname','tmm_Season','tmm_TeamName','tmm_PersonID')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Technische commissie Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblTeams'
AND ucl_ColumnName IN ('tea_Clubname','tea_Season','tea_TeamName','tea_PoolSeason','tea_TeamKind','tea_ClassName','tea_PoolName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Tuchtcommissie Bond',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblCards'
AND ucl_ColumnName IN ('crd_HomeClubname','crd_HomeSeason','crd_HomeTeamName','crd_AgainstClubname','crd_AgainstSeason','crd_AgainstTeamName','crd_Clubname','crd_Season','crd_TeamName','crd_PersonID','crd_Card','crd_Time')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Tuchtcommissie Bond',ucl_Tablename,ucl_ColumnName,1,1,0,1,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblCards'
AND ucl_ColumnName IN ('crd_NrOfSuspension')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Tuchtcommissie Bond',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_ID','prs_Lastname','prs_MiddleName','prs_Firstname','prs_Initials','prs_Sexe','prs_DateofBirth','prs_Telephone','prs_Email','prs_Username','prs_FamilyClubName','prs_FamilyName','prs_FederationNr','prs_State','prs_Remarks','prs_RefereeNr','prs_Referee','prs_Active')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Voorzitter Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblComplex'
AND ucl_ColumnName IN ('cpx_Clubname','cpx_ComplexName','cpx_Adres','cpx_Zipcode','cpx_City','cpx_Telephone','cpx_Description')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Voorzitter Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFamilies'
AND ucl_ColumnName IN ('fam_ClubName','fam_FamilyName','fam_Adres','fam_Zipcode','fam_City')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Voorzitter Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMembersAdmin'
AND ucl_ColumnName IN ('mba_PersonID','mba_ClubName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Voorzitter Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblOfficialsCommissioner'
AND ucl_ColumnName IN ('ofc_PersonID','ofc_ClubName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Voorzitter Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblOfficialScorer'
AND ucl_ColumnName IN ('ofs_PersonID','ofs_ClubName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Voorzitter Club',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_Telephone','prs_Email','prs_Username','prs_FederationNr','prs_State','prs_RefereeNr','prs_Referee','prs_Active')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Voorzitter Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPersons'
AND ucl_ColumnName IN ('prs_ID','prs_Lastname','prs_MiddleName','prs_Firstname','prs_Initials','prs_Sexe','prs_DateofBirth','prs_FamilyClubName','prs_FamilyName','prs_Remarks')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Voorzitter Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblTechnicalCommissioner'
AND ucl_ColumnName IN ('tco_PersonID','tco_ClubName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Wedstrijdsecretariaat Bond',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblClasses'
AND ucl_ColumnName IN ('cls_ClassName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Wedstrijdsecretariaat Bond',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatches'
AND ucl_ColumnName IN ('mat_From','mat_To','mat_Field')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Wedstrijdsecretariaat Bond',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatches'
AND ucl_ColumnName IN ('mat_HomeClubname','mat_HomeSeason','mat_HomeTeamName','mat_AgainstClubname','mat_AgainstSeason','mat_AgainstTeamName','mat_Date','mat_Clubname','mat_ComplexName','mat_Description')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Wedstrijdsecretariaat Bond',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblPools'
AND ucl_ColumnName IN ('pol_Season','pol_TeamKind','pol_ClassName','pol_PoolName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Wedstrijdsecretariaat Bond',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblSeasons'
AND ucl_ColumnName IN ('ses_Season')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Wedstrijdsecretariaat Bond',ucl_Tablename,ucl_ColumnName,1,1,0,1,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblTeams'
AND ucl_ColumnName IN ('tea_Clubname','tea_Season','tea_TeamName','tea_PoolSeason','tea_TeamKind','tea_ClassName','tea_PoolName')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Wedstrijdsecretariaat Club',ucl_Tablename,ucl_ColumnName,1,1,1,1,1,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblFields'
AND ucl_ColumnName IN ('fld_Clubname','fld_ComplexName','fld_Field','fld_KindOfField')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Wedstrijdsecretariaat Club',ucl_Tablename,ucl_ColumnName,1,1,0,0,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatches'
AND ucl_ColumnName IN ('mat_HomeClubname','mat_HomeSeason','mat_HomeTeamName','mat_AgainstClubname','mat_AgainstSeason','mat_AgainstTeamName','mat_Date','mat_Clubname')

INSERT tblUFGColumnRights (ucr_RoleName,ucr_TableName,ucr_ColumnName,ucr_SelectRight,ucr_SearchRight,ucr_InsertRight,ucr_UpdateRight,ucr_DeleteRight,ucr_VisibleInGrid)
SELECT 'Wedstrijdsecretariaat Club',ucl_Tablename,ucl_ColumnName,1,1,0,1,0,1 FROM tblUFGColumns
WHERE ucl_TableName = 'tblMatches'
AND ucl_ColumnName IN ('mat_From','mat_To','mat_ComplexName','mat_Field','mat_Description')

COMMIT TRAN
